package system.model.converter;

import common.model.po.SysWebConfig;
import system.model.request.SaveUserConfigRequest;

/**
 * 描述
 *
 * @author 米泽鹏
 * @since 2023-3-24 下午 3:47
 */
public class SysWebConfigConverter {

	public static SysWebConfig requestToPo(SaveUserConfigRequest saveUserConfigRequest) {
		if (saveUserConfigRequest == null) {
			return null;
		}
		SysWebConfig sysWebConfig = new SysWebConfig();
		sysWebConfig.setUserId(saveUserConfigRequest.getUserId());
		sysWebConfig.setLayoutMode(saveUserConfigRequest.getLayoutMode());
		sysWebConfig.setMainAnimation(saveUserConfigRequest.getMainAnimation());
		sysWebConfig.setIsDark(saveUserConfigRequest.getIsDark());
		sysWebConfig.setMenuWidth(saveUserConfigRequest.getMenuWidth());
		sysWebConfig.setMenuDefaultIcon(saveUserConfigRequest.getMenuDefaultIcon());
		sysWebConfig.setMenuCollapse(saveUserConfigRequest.getMenuCollapse());
		sysWebConfig.setMenuUniqueOpened(saveUserConfigRequest.getMenuUniqueOpened());
		sysWebConfig.setMenuShowTopBar(saveUserConfigRequest.getMenuShowTopBar());
		sysWebConfig.setMenuBackground(saveUserConfigRequest.getMenuBackground());
		sysWebConfig.setMenuColor(saveUserConfigRequest.getMenuColor());
		sysWebConfig.setMenuActiveBackground(saveUserConfigRequest.getMenuActiveBackground());
		sysWebConfig.setMenuActiveColor(saveUserConfigRequest.getMenuActiveColor());
		sysWebConfig.setMenuTopBarBackground(saveUserConfigRequest.getMenuTopBarBackground());
		sysWebConfig.setHeaderBarTabColor(saveUserConfigRequest.getHeaderBarTabColor());
		sysWebConfig.setHeaderBarBackground(saveUserConfigRequest.getHeaderBarBackground());
		sysWebConfig.setHeaderBarHoverBackground(saveUserConfigRequest.getHeaderBarHoverBackground());
		sysWebConfig.setHeaderBarTabActiveBackground(saveUserConfigRequest.getHeaderBarTabActiveBackground());
		sysWebConfig.setHeaderBarTabActiveColor(saveUserConfigRequest.getHeaderBarTabActiveColor());
		sysWebConfig.setTabIcon(saveUserConfigRequest.getTabIcon());
		sysWebConfig.setLanguage(saveUserConfigRequest.getLanguage());
		return sysWebConfig;
	}

}
